package com.start_eternity.oasissafewalk.mapper;

import com.start_eternity.oasissafewalk.pojo.Car;
import com.start_eternity.oasissafewalk.pojo.Driver;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface CarMapper {
    /*查询全部车辆数据*/
    public List<Car> list(String carName);
    /*
  /*批量删除*/
    void delete(List<Integer> ids);
    /*新增车辆*/
    @Insert("insert into car(car_name,color,number,status,people_number,buying_time,create_time,update_time,route_id ) VALUES " +
            "(#{carName},#{color},#{number},#{status},#{peopleNumber},#{buyingTime},#{createTime},#{updateTime},#{routeId})")
    void insert(Car car);
    //根据id查询车辆
    @Select("select *  from car where car_id=#{carId}")
      Car getById(Integer carId);
//        更新车辆信息
        void update(Car car);
}
